#include "windowmodel.h"

WindowModel::WindowModel(HWND hWnd, WindowView *wView)
{
	_hWnd = hWnd;
	_wView = wView;
}

WindowModel::~WindowModel()
{
	//dtor
}

void WindowModel::Fetch(UINT message, WPARAM wParam)
{
	static int x=16;
	static int y=16;

	switch( message )
	{
	case WM_KEYDOWN:
		switch(wParam)
		{
		case VK_LEFT:
			x-=16;
			break;
		case VK_RIGHT:
			x+=16;
			break;
		case VK_UP:
			y-=16;
			break;
		case VK_DOWN:
			y+=16;
			break;
		}
		_wView->Redraw();
		return;
	case WM_CHAR:
		break;
	}
}
